<%@page import="com.kaishengit.pms.entity.Employee"%>
<%@page import="com.kaishengit.pms.entity.Contactnote"%>
<%@page import="com.kaishengit.pms.util.TimeNoteUtil"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<style type="text/css">
		body{
			background-image:url(img/bb.jpg);
			background-repeat:repeat-x;
		}
	</style>
</head>
<body class="body">
	<%@ include file="include/main-top.jsp" %>
	<div class="container">
	  <div class="row">
			<jsp:include page="include/left.jsp">
				<jsp:param value="contact" name="tag"/>
			</jsp:include>
			<div class="span9">
				<div class="span8">
					<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0">
						<li class="active">
							<a href="contact.jspx?m=contact&projectid=${ep.project.id}"><i class="icon-user"></i>联系人</a>
						</li>
					</ul>
				</div>
				<div></div>
					<div class="span8"> 
						<div class="well">
							<address>
									<h3>${contact.name}</h3>
									<p><small>公司：</small>${contact.companyname}</p>
									<small>手机：</small> ${contact.mobile}<br/>
									<small>固话：</small> ${contact.tel}<br/><br/>
									<small>邮箱：</small> ${contact.email}<br/>
									<small>地址：</small> ${contact.address}<br/><br/>
									<small>主页：</small> <a href="${contact.website}">${contact.website}</a><br/>
									<small>微博：</small> <a href="${contact.weibo}">${contact.weibo}</a><br/>
								</address>
								<div class="line">记录</div>
								<form action="contact.jspx?m=contactnote" method="post">
									<textarea  id="content_1"  class="span5" rows="3" name="contactnote" style="width:400px;height:100px;"></textarea>
									<br/>
									<button class="btn btn-primary" type="submit">发布</button>
								</form>
								<%
									List<Contactnote> cnlist = (List<Contactnote>)session.getAttribute("contactnotelist");
										for(Contactnote cn : cnlist){
								 %>	
								<blockquote>
								  <%= cn.getContent() %>
								  <small><%=cn.getEmployee().getUsername() %>  <%=TimeNoteUtil.getTime(cn.getCreatime()) %></small>
								</blockquote>
								<%}%>
								<ul class="pager">
									<li class="previous" >
										<a style="background-color:#59B059;color:#fff;" href="contact.jspx?m=contact&projectid=${ep.project.id}">← 返回联系人列表</a>
									</li>
								</ul>
						</div>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript" charset="utf-8" src="kindeditor/kindeditor.js"></script>
	<script type="text/javascript"> 
		KindEditor.ready(function(K) {
		K.create("#content_1",
								{
									items : [ 'fontname', 'fontsize', '|',
											'forecolor', 'hilitecolor', 'bold',
											'italic', 'removeformat', '|',
											'emoticons', ],
						afterChange : function() {
							K('.word_count1').html(this.count());

							K('.word_count2').html(
							this.count('text'));
										
						if (this.count('text') > 140) {
							alert("最多只能输入140个字符");
							var a = $("#content_1").val();
							a = $("#content_1").val().substring(0, 140);
							return false;
						}
					}
				});
			});
	
	</script>
</body>

</html>